//
//  PTYSwitch.h
//  ICrEAM
//
//  Created by mac on 16/10/31.
//  Copyright © 2016年 mac. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface PTYSwitch : UIControl

@property (nonatomic, strong) UIColor *backgroundColor;

//
@property (nonatomic, strong) UIColor *sliderColor;
@property (nonatomic) CGFloat cornerRadius;
//
@property (nonatomic, strong) UIColor *sliderBottomColor;
//
@property (nonatomic, strong) UIColor *backgroundBottomColor;
@property (nonatomic, strong) UIColor *backgroundTopColor;
@property (nonatomic, strong) UIColor *seperateColor;

@property (nonatomic, strong) UIColor *labelTextColorInsideSlider;
@property (nonatomic, strong) UIColor *labelTextColorOutsideSlider;
@property (nonatomic, strong) UIFont *labelTextFont;
@property (nonatomic) CGFloat sliderOffset;


+ (instancetype)switchWithStringsArray:(NSArray *)strings;
- (instancetype)initWithStringsArray:(NSArray *)strings;
- (instancetype)initWithAttributedStringsArray:(NSArray *)strings;

- (void)forceSelectedIndex:(NSInteger)index animated:(BOOL)animated;
- (void)setPressedHandler:(void(^)(NSUInteger index))handler;
- (void)setWillBePressedHandler:(void(^)(NSUInteger index))handler;
- (void)selectIndex:(NSInteger)index animated:(BOOL)animated;

- (void)animateChangeToIndex:(NSInteger)selectedIndex callHandler:(BOOL)callHandler;

@end
